package utils;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

import model.ProxyEvent;

public class DataWriter {

	public DataWriter(ProxyEvent event) {

		try {
			FileWriter writer = new FileWriter(new File(
					"files/esame_storia.txt"));

			for (int i = 0; i < event.getEvents().size(); i++) {
				writer.write(event.getEvents().get(i) + " "
						+ event.getDates().get(i) + " "
						+ event.getPlaces().get(i) + "\n");
			}

			writer.close();
		} catch (IOException e) {
			e.printStackTrace();
		}

	}
}